home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / editors / emcs1857 / 1857sr~1.zoo / README.8bit < prev   
Encoding:
Text File  |  1992-02-03  |  15.4 KB  |  445 lines

  1. CFLAGS= -O
  2. CC=gcc -pipe -traditional
  3.  
  4. Originally Howard Gayle wrote a set of patches for GNU Emacs
  5. 18.55 for displaying, sorting and converting 8-bit characters.
  6. However, Emacs 18.55 contains some bugs, and I wanted to apply
  7. them to 18.57.  This wasn't straightforward, since there were
  8. lots of internal differences between 18.55 and 18.57.  However, I
  9. have finally succeeded in applying them.  At least I think I
  10. have...  The support for char-tables are working.  I haven't had
  11. the time to try out how case-tables, sort-tables and trans-tables
  12. work.  It compiles without any errors, at least when using GCC on
  13. our Sun machines.
  14.  
  15. Below follows what Howard Gayle has written about his patches for
  16. Emacs 18.55.  You should read that before installing these
  17. patches.  Just substitute 18.57 when he speaks about 18.55.  If
  18. you have only the diffs, then you need to recompile all the .elc
  19. files in the lisp directory, but if you have the entire patched
  20. 18.57, I have recompiled them for you (using a newer and,
  21. presumably better, byte-compiler).  I have also included an extra
  22. elisp file, iso-chars.el, for displaying ISO 8859-1 characters,
  23. since I wanted an alternative to Howard Gayles variants.
  24.  
  25. You will also have to rebuild the info files emacs* in the info
  26. directory, if you only have the diffs.
  27.  
  28. Install the patches by copying all files into the respective
  29. directories in the Emacs distribution.  The apply the diffs in
  30. the file 'DIFFS'.
  31.  
  32. If you find any bugs when using these routines, or if you find
  33. any bugs not in the standard 18.57, I would like to know about
  34. them.  I might take myself some time and try to fix them, but no
  35. promise.
  36.  
  37. Share and enjoy!
  38.  
  39. --
  40. Thomas Bellman, Lysator Computer Club
  41. University of Linkoping, Sweden
  42. Bellman@Lysator.LiU.Se
  43.  
  44.  
  45. ------------------------------------------------------------------------
  46.  
  47.  
  48.       SUMMARY
  49.  
  50. I have modified GNU Emacs version 18.55 to handle many 8-bit
  51. character sets, including the ISO 8859 character sets.  For each
  52. character, it is possible to customize the byte(s) sent to the
  53. terminal to display that character.  X11R4 is also supported, to
  54. an extent.  Case determination, case changing, and sorting can
  55. all be customized.  Input facilities are primitive.
  56.  
  57.  
  58.       DISCOURAGEMENT
  59.  
  60. Emacs version 19 will support 8-bit character sets.  That
  61. support is based on my modifications, but there will probably be
  62. some differences between the 8-bit character set support in this
  63. modified version 18.55 and the support in version 19.
  64. Therefore, if you can wait for version 19 I urge you to do so.
  65. Richard Stallman says he does not know when version 19 will be
  66. available.
  67.  
  68. This is alpha-test software.  It has known bugs.  I'm posting it
  69. to alt.sources to emphasize that, and to avoid having it
  70. archived.  If you don't know your way around GNU Emacs, please
  71. don't try to install it.  I don't have time to provide support.
  72. (But please send bug reports anyway.)
  73.  
  74. Input support is primitive.  X windows support is for X11 only,
  75. and is incomplete.
  76.  
  77.  
  78.       CHARACTER SETS SUPPORTED
  79.  
  80. So I haven't scared you off yet.  OK, you were warned.  My
  81. modifications allow GNU Emacs to handle any character set
  82. provided that each character is represented by exactly one 8-bit
  83. byte, and the codes for space, newline, and horizontal tab are
  84. the same as in ASCII.  Now for some definitions.
  85.  
  86.  
  87.       DEFINITIONS
  88.  
  89. A glyf is something that takes up exactly one position on the
  90. display of a terminal, terminal emulator, or window system.  For
  91. example, 'a' is a glyf, as is a yellow, blinking, underlined '7'
  92. on a red background.  It may be necessary to transmit many bytes
  93. to a terminal to display one glyf.  A rope is a sequence of
  94. glyfs.  (The name is an analogy to string, which is a sequence
  95. of characters.) For example, the glyf '^' followed by the glyf
  96. 'C' forms a rope of length 2.  Glyfs are represented as unsigned
  97. 16-bit integers.  Ropes are represented as vectors of glyfs.
  98.  
  99.  
  100.       CHAR TABLES
  101.  
  102. There's a new lisp object: char tables.  A char table specifies,
  103. for each 8-bit character, the rope to use to display that
  104. character.  Char tables are associated with windows, not
  105. buffers, so one buffer can be displayed in several different
  106. windows with several different char tables.
  107.  
  108.  
  109.       CASE TABLES
  110.  
  111. Another new lisp object, case tables, specify for each 8-bit
  112. character the case: upper, lower, or none.
  113.  
  114.  
  115.       SORT TABLES
  116.  
  117. Another new lisp object, sort tables, specify for each 8-bit
  118. character its sorting position.  Sort tables are also used for
  119. searching.  Special sort tables can be set up, for example, to
  120. ignore diacritical marks when searching.
  121.  
  122.  
  123.       TRANS TABLES
  124.  
  125. Finally, trans tables are lisp objects that map each 8-bit
  126. character into some other character.  They are used for case
  127. conversion, and can also be used for character set conversion.
  128.  
  129.  
  130.       ISO 8859/1 SUPPORT
  131.  
  132. I include support for displaying ISO 8859/1 characters.  On
  133. ASCII terminals they display as various ropes, e.g. A with grave
  134. accent displays as {`A}.  If your terminal can display some of
  135. the characters correctly, e.g. by using shift-out and shift-in,
  136. then you can write a lisp/term file to do that.  I include as an
  137. example lisp/term/fa4440a.el for the Facit 4440 Twist terminal
  138. with a Swedish PROM.  If your terminal (emulator) provides full
  139. ISO 8859/1, you can just send 8-bit characters to it directly.
  140. See the code in lisp/term/x-win.el starting with "(if (fboundp
  141. 'get-glyf)" for an example.
  142.  
  143.  
  144.       SWEDISH SUPPORT
  145.  
  146. I include support for Swedish as an example of language
  147. support.  This includes a swedish mode analogous to text mode,
  148. and sort tables for Swedish alphabetical order.
  149.  
  150.  
  151.       INPUT
  152.  
  153. Input is kludgy.  The file lisp/iso8859-1-insert.el defines
  154. little functions to insert each non-ASCII ISO 8859/1 character.
  155. These are put into the global keymap under C-x 8, which is
  156. supposed to be mnemonic for 8859.  So e.g. "C-x 8 ` A" runs
  157. insert-A-grave.  This is OK for infrequently used characters,
  158. but for those you use often I suggest you use programmable keys
  159. on your terminal, if possible.  For example, Swedish uses o with
  160. umlaut a lot, so I have one of the programmable keys on my
  161. terminal set up to transmit "C-q 3 6 6".  Using C-q also means
  162. this works with e.g. incremental search, not just for
  163. inserting.
  164.  
  165. Here's what I do on my Facit 4440 Twist:
  166.    1) Press Setup
  167.    2) Press 5 to enter Setup B mode
  168.    3) Press F4 C-q 3 4 5 C-Return
  169.       Press F5 C-Q 3 4 4 C-Return
  170.       Press F6 C-Q 3 6 6 C-Return
  171.       Press F7 C-Q 3 5 1 C-Return
  172.       Press F8 C-Q 3 7 4 C-Return
  173.       Press Shift-F4 C-Q 3 0 5 C-Return
  174.       Press Shift-F5 C-Q 3 0 4 C-Return
  175.       Press Shift-F6 C-Q 3 2 6 C-Return
  176.       Press Shift-F7 C-Q 3 1 1 C-Return
  177.       Press Shift-F8 C-Q 3 3 4 C-Return
  178.    4) Press S to save everything in nonvolatile memory.
  179. This puts a with ring on function key 4, a with umlaut on F5, o
  180. with umlaut on F6, e with acute accent on F7, and u with umlaut
  181. on F8.
  182.  
  183.  
  184.       X WINDOWS SUPPORT
  185.  
  186. Only X11 is supported, not X10.  I've only tried this on X11R4.
  187. Eventually, the idea is for each glyf, which is really just  an
  188. unsigned 16-bit integer, to be treated as two bytes.  The low
  189. order byte selects one face code in a font, for example 'g'.
  190. The high order byte selects a graphic context (GC).  But for
  191. now, there's only one GC.
  192.  
  193. For input of frequently-used characters I just hacked
  194. stringFuncVal in src/x11term.c.  You may wish to do the same.
  195.  
  196. Many of the X11R4 fonts advertised as ISO 8859/1 don't really
  197. contain all the characters; 7x14 does, so that's what I use for
  198. now.  Here's another font to try:
  199.  
  200. >From: jw@sics.se (Johan Widen)
  201. >Newsgroups: comp.windows.x
  202. >Subject: eightbit version of the 'fixed' font available
  203. >Message-ID: <1990Mar9.164011.1775@sics.se>
  204. >Date: 9 Mar 90 16:40:11 GMT
  205. >Distribution: comp
  206. >Organization: Swedish Institute of Computer Science, Kista
  207. >
  208. >An eightbit version of the X11R4 'fixed' font (also known as 6x13) is available
  209. >for anonymous ftp from
  210. >    sics.se (192.16.123.90)
  211. >in the compressed tar file
  212. >    archive/fixed.bdf.Z
  213. >
  214. >The glyphs below 128 are unchanged. The ISO-8859-1 characters from 160 to 255
  215. >have been added.
  216. >
  217. >I'm interested in any improvements/fixes that you make to this font.
  218. >
  219. >--
  220. >Johan Widen
  221. >SICS, PO Box 1263, S-164 28 KISTA, SWEDEN    Internet: jw@sics.se
  222. >Tel: +46 8 752 15 32    Ttx: 812 61 54 SICS S    Fax: +46 8 751 72 30
  223.  
  224.  
  225.       OTHER APPLICATIONS
  226.  
  227. These modifications have other uses than supporting 8-bit
  228. character sets.  The file lisp/emphasis.el uses the high bit to
  229. indicate emphasis, e.g. underlining, of 7-bit ASCII.  A hook in
  230. lisp/man.el then displays italicized test in manual entries with
  231. emphasis if possible.
  232.  
  233. The file lisp/rot13.el contains a disgusting hack that displays
  234. a buffer in another window, but with a rot13 char table.  I
  235. really use this when reading rec.humor.funny with Gnews.
  236.  
  237. If you don't like unprintable characters to be displayed in
  238. octal, you can change to hex or whatever.
  239.  
  240.  
  241.       RELATED SOFTWARE
  242.  
  243. My cz system lets you print ISO 8859/1 text on PostScript
  244. printers.  It interfaces to GNU Emacs.  To get it, get these
  245. articles from your nearest comp.sources.misc archive:
  246.  
  247. cz          comp.sources.misc volume  8 issues 65-75, 77-78 ( 1 Oct 1989)
  248.                                         issue  97           (28 Oct 1989)
  249. libhoward   comp.sources.misc volume  8 issues 80-87        ( 1 Oct 1989)
  250.                                         issue  96           (28 Oct 1989)
  251.  
  252.  
  253.       BUGS
  254.  
  255. It should be possible to format texinfo files into info files by
  256. doing this (e.g. for cl.texinfo):
  257.    % cd man; emacs -batch -funcall batch-texinfo-format cl.texinfo
  258.    texinfo formatting /usr/local/free/gnu-emacs/18.55i/man/cl.texinfo...
  259.    Formatting Info file...
  260.    Making tags table for Info file...
  261.    >> Error: (void-variable This)
  262.    >>  point at
  263.    >>  Info file: cl,    -*-Text-*-
  264.    >>  produced by texinfo-format-buffer
  265.    >>  from file: cl.texinfo
  266.    >>  Copyright (C
  267. But that gives the error shown.  However this works:
  268.    % emacs -batch -load info -funcall batch-texinfo-format cl.texinfo
  269. To the first person who supplies me with a fix for this bug, I
  270. offer a color portrait of the Swedish Royal Family, with a
  271. genuine Swedish postage stamp on the other side.
  272.  
  273.  
  274.       INSTALLATION
  275.  
  276. Start with a copy of GNU Emacs 18.55 as distributed.  Parts 1
  277. through 4 are shar archives; unshar them.
  278.  
  279. Two of the lisp files have high-order bits set.  They are
  280. encoded with Brad Templeton's abe system, which was posted to
  281. comp.sources.misc on 4 June 1989 as volume 7, issues 1 and 2,
  282. archive name abe.  To extract them, you must have the dabe
  283. command.  Do:
  284.    % cd lisp
  285.    % dabe el.abe
  286.    % cd ..
  287.  
  288. Parts 5 through 12 are context diffs.  Parts 11 and 12 are
  289. together the diffs to man/emacs.tex; they must be concatenated.
  290. Apply the diffs with patch.
  291.  
  292. Now install Emacs as usual.  When byte-recompiling the elisp
  293. code, it may be necessary to load case-table.el, char-table.el,
  294. sort-table.el, and trans-table.el first.  Be sure to
  295. byte-compile all the new .el files you intend to use.  Here's
  296. the complete list:
  297.    case-table.el
  298.    char-table-vt100.el
  299.    char-table.el
  300.    emphasis.el
  301.    iso8859-1-ascii.el
  302.    iso8859-1-insert.el
  303.    iso8859-1-swedish.el
  304.    iso8859-1.el
  305.    rot13.el
  306.    sort-table.el
  307.    swedish.el
  308.    trans-table.el
  309.    term/id100.el
  310.    term/fa4440a.el
  311.    term/fa4440b.el
  312.  
  313. You'll probably want to load some character set and language
  314. support from lisp/site-init.el.  For example, ours starts like
  315. this:
  316.    (load "iso8859-1")
  317.    (garbage-collect)
  318.    (load "iso8859-1-insert")
  319.    (garbage-collect)
  320.    (load "swedish")
  321.    (garbage-collect)
  322.  
  323.  
  324.       CHANGES
  325.  
  326. Here's a brief summary of what I changed in each file.  In src:
  327. abbrev.c: expand-abbrev: Use casetab.h macros.
  328.    Use HYPHEN.
  329. alloc.c:
  330.    GC case, char, sort, and trans tabs.
  331. buffer.c:
  332.    reset_buffer_local_variables: Initialize case_table_v, etc..
  333.    Drop selective_display_ellipses.
  334. buffer.h:
  335.    Add case_table_p, etc. & buffer_char_table.  Drop ctl_arrow.
  336. casefiddle.c: casify_object & casify_region: Use casetab.h macros.
  337. config.h-dist: Add 30000 to PURESIZE.
  338. cmds.c: Use chartab.h macros.
  339. data.c: Add arg_out_of_range.
  340. dired.c: Use standard_downcase_table_p instead of downcase_table.
  341. dispextern.h: Change char to glyf_t.
  342. dispnew.c: Use chartab.h macros.  Change char to glyf_t.  Check for X 
  343.    windows in chartab.c now.
  344. editfns.c: Use casetab.h & chartab.h macros.
  345. emacs.c: Call init_case_table_once, init_char_table_once,
  346.    syms_of_case_table, and syms_of_char_table.
  347. fileio.c: #include casetab.h
  348. fns.c: Add string-lessp*.
  349. indent.c:
  350.    Use chartab.h macros.
  351.    Use char table to compute lengths instead of hard code.
  352.    Drop selective_display_ellipses.
  353. keyboard.c: Use ROPE_LEN to check if direct insertion OK.
  354. lisp.h:
  355.    Move case macros to casetab.h.
  356.    Add Lisp_Chartab and related definitions.
  357. minibuf.c: Use casetab.h macros.
  358. process.c: Use transtab.h macros.
  359. print.c: Print out char tables.
  360. regex.c: Drop translate.
  361. regex.h: Use sort table when compiling pattern.
  362. scroll.c: lisp.h must be included before dispextern.h.
  363. search.c: Remove downcase_table & compute_trt_inverse.
  364.    syms_of_search: Remove initialization of downcase_table.
  365.    Use NEWLINE.
  366. term.c: char -> glyf.
  367. termchar.h: Replace vector DCICcost by function.
  368. termhooks.h: {insert,write,delete}_chars_hook ->
  369.    {insert,write,delete}_glyfs_hook
  370. window.c:
  371.    Add window-char-table & set-window-char-table.
  372.    Save char tables for saved windows.
  373. window.h: Add window_char_table.
  374. xdisp.c:
  375.    Use chartab.h macros.  char->glyf.
  376.    Drop selective_display_ellipses.
  377. x11term.c: char->glyf
  378. ymakefile: Add new files and include dependencies.
  379.  
  380. In lisp:
  381. keypad.el: Add backtab code.  Comments.
  382. man.el: Add manual-entry-hook.  Default to default-manual-entry-hook,
  383.    which removed underlining and overstriking.
  384. mlconvert.el: Changing control-code display is different.
  385. rmail.el: Run rmail-get-new-mail-hook after getting new mail.
  386. sendmail.el: Run mail-send-hook just before sending mail.
  387. sort.el: string< -> string-lessp*
  388. text-mode.el: (provide 'text-mode)
  389. term/x-win.el: direct-map high-order ISO 8859 bits
  390.  
  391. In etc:
  392. NEWS
  393. makedoc.com
  394.  
  395. In man:
  396. emacs.tex
  397.  
  398.  
  399.       EMAIL
  400.  
  401. Here's how I read and send email in ISO 8859/1 while still
  402. living in a 7-bit (ISO 646) world.  I run Chip Salzenberg's
  403. deliver program.  My .deliver file looks like this:
  404.    cat $HEADER $BODY | 78seus | deliver -n "$1"
  405.    echo DROP
  406. (OK, I'm lying.  My real .deliver file also saves a copy of
  407. incoming messages.  Also, it has absolute path names to 78seus
  408. and deliver, because they're not in /usr/bin.  But you get the
  409. idea.)
  410.  
  411. The 78seus filter is part of my cz system (see above).  It
  412. converts mixed English and Swedish to ISO 8859/1.  Cz also has
  413. one for Danish, plus a paper on how to make your own.
  414.  
  415. I then read mail with GNU Emacs rmail mode, as usual.
  416.  
  417. When sending mail I write it in ISO 8859/1 in Emacs sendmail
  418. mode.  Just before sending it, sendmail runs mail-send-hook,
  419. which is set in lisp/swedish.el to call the function
  420. 8859-to-swascii-buffer.  This function maps the ISO 8859/1 to
  421. ISO 646.
  422.  
  423. Deliver was posted to comp.sources.unix on 16 October 1989 as
  424. volume 20, issues 23 through 26, archive name deliver2.0.  These
  425. are the patches I know about:
  426.    1 comp.sources.unix volume 20 issue 27 (16 Oct 1989)
  427.    2 comp.sources.bugs,comp.mail.misc 15 Dec 1989
  428.    3 comp.sources.bugs,comp.mail.misc 15 Dec 1989
  429.    4 comp.sources.bugs,comp.mail.misc 15 Dec 1989
  430.    5 comp.sources.bugs,comp.mail.misc 19 Dec 1989
  431.    6 comp.sources.bugs,comp.mail.misc 19 Feb 1990
  432.    7 comp.sources.bugs,comp.mail.misc  7 Mar 1990
  433.    8 comp.sources.bugs,comp.mail.misc  7 Mar 1990
  434.    9 comp.sources.bugs,comp.mail.misc  7 Mar 1990
  435. --
  436. Howard Gayle
  437. TN/ETX/TT/HL
  438. Ericsson Telecom AB
  439. S-126 25 Stockholm
  440. Sweden
  441. howard@ericsson.se
  442. uunet!ericsson.se!howard
  443. Phone: +46 8 719 5565
  444. FAX  : +46 8 719 8439
  445.